import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

/* Layout */
import Layout from '../layout/Layout'

/**
* hidden: true                   if `hidden:true` will not show in the sidebar(default is false)
* alwaysShow: true               if set true, will always show the root menu, whatever its child routes length
*                                if not set alwaysShow, only more than one route under the children
*                                it will becomes nested mode, otherwise not show the root menu
* redirect: noredirect           if `redirect:noredirect` will no redirect in the breadcrumb
* name:'router-name'             the name is used by <keep-alive> (must set!!!)
* meta : {
    title: 'title'               the name show in submenu and breadcrumb (recommend set)
    icon: 'svg-name'             the icon show in the sidebar,
  }
**/

export const constantRouterMap = [
  { path: '/login',
    meta: { title: '登录', noCache: true },
    component: () => import('@/views/login'),
    hidden: true
  },
  {
    path: '/404',
    component: () => import('@/views/features/404'),
    hidden: true
  },
  {
    path: '/401',
    component: () => import('@/views/features/401'),
    hidden: true
  },
  {
    path: '/redirect',
    component: Layout,
    hidden: true,
    children: [
      {
        path: '/redirect/:path*',
        component: () => import('@/views/features/redirect')
      }
    ]
  },
  {
    path: '/',
    component: Layout,
    redirect: 'dashboard',
    children: [
      {
        path: 'dashboard',
        component: () => import('@/views/home'),
        name: '首页',
        meta: { title: '首页', icon: 'index', noCache: true, affix: true }
	  },
	//   {
    //     path: 'Form',
    //     component: () => import('@/views/business/loan-manage/components/Form.vue'),
    //     name: '打印首页',
    //     meta: { title: '打印首页', icon: 'index', noCache: true, affix: true }
	//   },
	//   {
    //     path: 'FormOne',
    //     component: () => import('@/views/business/loan-manage/components/FormOne.vue'),
    //     name: '打印首页1',
    //     meta: { title: '打印首页1', icon: 'index', noCache: true, affix: true }
	//   },
	//   {
    //     path: 'FormTwo',
    //     component: () => import('@/views/business/loan-manage/components/FormTwo.vue'),
    //     name: '打印首页2',
    //     meta: { title: '打印首页2', icon: 'index', noCache: true, affix: true }
	//   },
	//   {
    //     path: 'FormThree',
    //     component: () => import('@/views/business/loan-manage/components/FormThree.vue'),
    //     name: '首页3',
    //     meta: { title: '首页3', icon: 'index', noCache: true, affix: true }
	//   },
	//   {
    //     path: 'HomeIndex',
    //     component: () => import('@/views/business/loan-manage/components/HomeIndex.vue'),
    //     name: '封面',
    //     meta: { title: '封面', icon: 'index', noCache: true, affix: true }
	//   },
	//   {
    //     path: 'All',
    //     component: () => import('@/views/business/loan-manage/components/All.vue'),
    //     name: 'all',
    //     meta: { title: 'all', icon: 'index', noCache: true, affix: true }
	//   },
	//   {
    //     path: 'Submit',
    //     component: () => import('@/views/business/loan-manage/components/Submit.vue'),
    //     name: 'submit',
    //     meta: { title: 'submit', icon: 'index', noCache: true, affix: true }
	//   },
	//   {
    //     path: 'DD',
    //     component: () => import('@/views/business/loan-manage/components/DD.vue'),
    //     name: 'DD',
    //     meta: { title: 'DD', icon: 'index', noCache: true, affix: true }
	//   },
	//   {
    //     path: 'DDCOPY',
    //     component: () => import('@/views/business/loan-manage/components/DDCOPY.vue'),
    //     name: 'DDCOPY',
    //     meta: { title: 'DDCOPY', icon: 'index', noCache: true, affix: true }
	//   },
	//   {
    //     path: 'DDDD',
    //     component: () => import('@/views/business/loan-manage/components/DDDD.vue'),
    //     name: 'DDDD',
    //     meta: { title: 'DDDD', icon: 'index', noCache: true, affix: true }
	//   },
    ]
  },
  {
    path: '/user',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'center',
        component: () => import('@/views/system/user/center'),
        name: '个人中心',
        meta: { title: '个人中心', icon: 'user' }
      }
    ]
  },

  {
	path: '/comDetails',
	name:'comDetails',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'comDetailss',
        component: () => import('@/views/business/custome/comcust/custComBaseinfo/comDetails/index'),
        name: 'comDetailss',
        meta: { title: '公司客户管理详情', icon: 'user' }
      }
    ]
  },
  {
	path: '/perDetails',
	name:'perDetails',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'perDetailss',
        component: () => import('@/views/business/custome/percust/custPerBaseinfo/perDetails/index'),
        name: 'perDetailss',
        meta: { title: '个人客户管理详情', icon: 'user' }
      }
    ]
  },


  {
	path: '/comDebtDetails',
	name:'comDebtDetails',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'comDebtDetailss',
        component: () => import('@/views/business/custome/comcust/custComBaseinfo/comDetails/finance/financelist/debt'),
        name: 'comDebtDetailss',
        meta: { title: '资产负债表', icon: 'user' }
      }
    ]
  },

  {
	path: '/comCashDetails',
	name:'comCashDetails',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'comCashDetailss',
        component: () => import('@/views/business/custome/comcust/custComBaseinfo/comDetails/finance/financelist/cash'),
        name: 'comCashDetailss',
        meta: { title: '现金流量表', icon: 'user' }
      }
    ]
  },

  
  {
	path: '/comProfitlossDetails',
	name:'comProfitlossDetails',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'comProfitlossDetailss',
        component: () => import('@/views/business/custome/comcust/custComBaseinfo/comDetails/finance/financelist/profitloss'),
        name: 'comProfitlossDetailss',
        meta: { title: '损益表', icon: 'user' }
      }
    ]
  },

  {
	path: '/comPerformDetails',
	name:'comPerformDetails',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'comPerformDetailss',
        component: () => import('@/views/business/custome/comcust/custComBaseinfo/comDetails/finance/financelist/perform'),
        name: 'comPerformDetailss',
        meta: { title: '绩效表', icon: 'user' }
      }
    ]
  },

  {
	path: '/comFinanalysisDetails',
	name:'comFinanalysisDetails',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'comFinanalysisDetailss',
        component: () => import('@/views/business/custome/comcust/custComBaseinfo/comDetails/credit/finanalysis/finanalysis'),
        name: 'comFinanalysisDetailss',
        meta: { title: '财务分析详情', icon: 'user' }
      }
    ]
  },


  {
	path: '/contractDetails',
	name:'contractDetails',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'contractDetailss',
        component: () => import('@/views/business/loan-manage/creditAccount/account/contract'),
        name: 'contractDetailss',
        meta: { title: '合同详情', icon: 'user' }
      }
    ]
  },

  {
	path: '/assure',
	name:'assure',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'assures',
        component: () => import('@/views/business/loan-manage/creditAccount/account/assure/index'),
        name: 'assures',
        meta: { title: '担保合同详情', icon: 'user' }
      }
    ]
  },






  
  {
	path: '/reportTemplate',
	name:'reportTemplate',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'reportTemplates',
        component: () => import('@/views/business/loan-manage/loanCheck/check/reportTemplate'),
        name: 'reportTemplates',
        meta: { title: '检查报告', icon: 'user' }
      }
    ]
  },
  

    
  {
	path: '/reportTemplateDetail',
	name:'reportTemplateDetail',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'reportTemplateDetails',
        component: () => import('@/views/business/loan-manage/loanCheck/check/reportTemplateDetail'),
        name: 'reportTemplateDetails',
        meta: { title: '检查报告详情', icon: 'user' }
      }
    ]
  },

  {
	path: '/reportDetails',
	name:'reportDetails',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'reportDetailss',
        component: () => import('@/views/business/loan-manage/integratedManage/manage/reportDetails'),
        name: 'reportDetailss',
        meta: { title: '检查报告详情', icon: 'user' }
      }
    ]
  },

  {
	path: '/templaDetails',
	name:'templaDetails',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'templaDetailss',
        component: () => import('@/views/business/loan-manage/templaConfiguration/template/addTemplate'),
        name: 'templaDetailss',
        meta: { title: '新增模板', icon: 'user' }
      }
    ]
  },




  {
	path: '/applyAdd',
	name:'applyAdd',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'applyAdds',
        component: () => import('@/views/business/asset-classification/application/apply/contract'),
        name: 'applyAdds',
        meta: { title: '新增认定申请', icon: 'user' }
      }
    ]
  },

  
  {
	path: '/applyAdjust',
	name:'applyAdjust',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'applyAdjusts',
        component: () => import('@/views/business/asset-classification/application/apply/adjust'),
        name: 'applyAdjusts',
        meta: { title: '调整', icon: 'user' }
      }
    ]
  },




  {
	path: '/particular',
	name:'particular',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'particulars',
        component: () => import('@/views/business/asset-classification/application/apply/particular'),
        name: 'particulars',
        meta: { title: '详情', icon: 'user' }
      }
    ]
  },

  {
	path: '/modelAdd',
	name:'modelAdd',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'modelAdds',
        component: () => import('@/views/business/asset-classification/pattern/model/contract'),
        name: 'modelAdds',
        meta: { title: '新增模型', icon: 'user' }
      }
    ]
  },


  {
	path: '/ruleAdd',
	name:'ruleAdd',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'ruleAdds',
        component: () => import('@/views/business/asset-classification/pattern/model/ruleAdd'),
        name: 'ruleAdds',
        meta: { title: '新增', icon: 'user' }
      }
    ]
  },

  {
	path: '/rule',
	name:'rule',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'rules',
        component: () => import('@/views/business/asset-classification/pattern/model/rule'),
        name: 'rules',
        meta: { title: '规则设置', icon: 'user' }
      }
    ]
  },


  {
	path: '/platform',
	name:'platform',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'platforms',
        component: () => import('@/views/business/asset-classification/monitoration/monitor/platform'),
        name: 'platforms',
        meta: { title: '详情', icon: 'user' }
      }
    ]
  },

  {
	path: '/approDetails',
	name:'approDetails',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'approDetailss',
        component: () => import('@/views/business/asset-classification/approvaltion/approval/basic/upcoming/approDetails'),
        name: 'approDetailss',
        meta: { title: '详情', icon: 'user' }
      }
    ]
  },


  {
	path: '/addRisk',
	name:'addRisk',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'addRisks',
        component: () => import('@/views/business/risk-warning/riskWarning/risk/contract'),
        name: 'addRisks',
        meta: { title: '详情', icon: 'user' }
      }
    ]
  },

  {
	path: '/editRisk',
	name:'editRisk',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'editRisks',
        component: () => import('@/views/business/risk-warning/riskWarning/risk/riskInfo'),
        name: 'editRisks',
        meta: { title: '详情', icon: 'user' }
      }
    ]
  },





  {
	path: '/rapproDetails',
	name:'rapproDetails',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'rapproDetailss',
        component: () => import('@/views/business/risk-warning/rapprovaltion/rapproval/basic/upcoming/approDetails'),
        name: 'rapproDetailss',
        meta: { title: '详情', icon: 'user' }
      }
    ]
  },



  {
	path: '/editRelieve',
	name:'editRelieve',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'editRelieves',
        component: () => import('@/views/business/risk-warning/riskRelieve/relieve/riskInfo'),
        name: 'editRelieves',
        meta: { title: '详情', icon: 'user' }
      }
    ]
  },

  // { path: '*', redirect: '/404', hidden: true }
]

export default new Router({
  mode: 'history',
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRouterMap
})
